< previous page page_309 next page >

Page 309
for graphic programs, screen savers, calendars, T-shirts, and all sorts of other colorful products. Figure 10.30 shows four different views of the Mandelbrot set.
While infinitely complex in appearance, the Mandelbrot set is based on a very simple equation:
e10a6a0a59f035e870d90cca05b85fce.gif
Zn = Zn12 + C
where the Zn and C are complex numbers.
As a quick review, recall that complex numbers have a real part and an imaginary part. A complex number with real part R and imaginary part I is written as R + I * i, where i is a special number representing the square root of 1. Now if Zn-1 = Rn-1 + In-1 * i and C = RC + IC * i, you can rewrite the equation above as:
e10a6a0a59f035e870d90cca05b85fce.gif
Zn  = Zn-12 + C
    = (R
n-1
 + In-1 * i)2 + (RC + IC * i)
    = (R
n-12 + 2 * Rn-1 * In-1 * i +  In-12 * i2) + (RC + IC * i)
Because i is the square root of 1, i2 = 1 by definition. Then you can regroup the real and imaginary parts of the equation to get:
e10a6a0a59f035e870d90cca05b85fce.gif
Zn = (Rn-12 - In-12 + RC) + (2 * Rn-1 * In-1 + IC) * i
You can rewrite this equation as two separate equations for the real and imaginary parts.
e10a6a0a59f035e870d90cca05b85fce.gif
Rn = Rn-12 - In-12 + RC
In = 2 * Rn-1 * In-1 + IC
0309-01.jpg
Figure 10.30
Different views of the Mandelbrot set.

 
< previous page page_309 next page >